home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
HENSA
/
MISC
/
TORNADO
/
EASY001.ZIP
/
4
< prev
next >
Wrap
Text File
|
1995-07-23
|
2KB
|
43 lines
File renderers
-=-=-=-=-=-=-=
Generally speaking, all files can be displayed by Tornado apps, whether they
be text, styled laid-out text, bitmap, vector, 3d vector, sound sample,
soundtracker, movie etc. This is done by the following method.
A file is loaded into a Tornado app which can load such filetypes by Tornado,
and is asked to redraw the file. The app calls Tornado_Renderfile, with the
filetype. Here's what happens at this stage:
* Tornado broadcasts a service call, and if a module picks it up, it renders
the file.
* If the service call isn't acknowledged, Tornado returns 'Please
reschedule' to the calling app, gives the user a message saying 'Please
wait', and looks in TRenderers:List, at the entry which is the 32 bit
hexadecimal of the filetype being rendered. The module detailed in there is
loaded in under multitasking.
* The module is initialised, and loads in any libraries it needs under
multitasking. Tornado first checks to see if these modules are present - if
so, all well and good, but if not they are loaded in under multitasking.
Tornado makes a note of the modules it loads in.
* Meanwhile, the initiating task has been calling Tornado_Renderfile
repeatedly and being told to wait. Now the renderer is present, the service
call is rebroadcast, whereupon the module should render the file.
* Now, depending on what the user has configured, the renderer is told to
quit and all modules loaded in by it are also quit, and removed from memory.
Obviously, if the user wishes, the module may remain in memory (the user
specifies max renderers to be in memory at once, or max number of bytes they
and their libraries should take up etc).
The reason for the libraries is that most files are currently rendered by
module-based code eg; soundtrackers, artwork files etc. All it would take is
a simple suitable module front-end which interfaces between Tornado and the
appropriate library.
As you can see, this is another extremely powerful aspect of Tornado. It
means things like DTP and hypertext apps can have all types of file
integrated into them, only limited by the renderers available. This includes
movies, sound, graphics - whatever.
Ok, I hope I got all of what I wanted to say in there too ... :-)